# This is a sample Python script.

# Press Shift+F10 to execute it or replace it with your code.
# Press Double Shift to search everywhere for classes, files, tool windows, actions, and settings.
# -*- coding:utf-8 -*-
from flask import Flask,render_template
app = Flask(__name__)
# 定义路由器及视图函数
@app.route('/')
def ha():
    # 比如需要传入网址
    url_str = 'www.baidu.com'
    my_list = [1, 3, 5, 7, 9]

    my_dict={
        'name': '广厦学子',
        'url': 'www.guangshaxy.com'
    }

    # 通常，模板中使用的数据保持一致
    return render_template('index.html', a=url_str,
                           sz=my_list,
                           mz=my_dict)


# 启动程序
if __name__ == '__main__':
    app.run()


